#include "PL02_tvfm.h"
#include <iostream>

using std::cout;
using std::endl;

bool Tv::volup(){
    if (volume < 100)
        volume++;
    else
        return false;
    return true;
}

bool Tv::voldown(){
    if (volume > 0)
        volume--;
    else
        return false;
    return true;
}

void Tv::chanup(){
    if (channel < maxchannel)
        channel++;
}
void Tv::chandown(){
    if (channel > 1)
        channel--;    
}
void Tv::settings() const{
    cout << "TV is:\t" << (state == On ? "On" : "Off") << endl;
    cout << "volume:\t" << volume << endl;
    cout << "channel:\t" << channel << endl;
    cout << "mode:\t" << (mode == Antenna ? "Antenna": "Cable") << endl;
    cout << "input :\t" <<  (input == TV ? "TV" :"DVD" ) << endl;
}
